Skip to content

Release: render casks without deprecated Homebrew DSL - #4

Merged
nickmorozov merged 1 commit into
mainfrom
postflight-steps
Nov 25, 2026
Merged

nickmorozov merged 1 commit into
mainfrom
postflight-steps

Conversation

@nickmorozov

Copy link
Copy Markdown
Member

The published focusrite-volume-control@beta cask prints two deprecation warnings on every brew command, and Homebrew deprecations later become errors:

  • Calling postflight is deprecated! Use postflight_steps instead.
  • Calling string comparison format for depends_on macos: is deprecated! Use depends_on macos: :sonoma instead.

The tap is rendered from this repo on every release, so the fix has to live here too, or the next release brings the old forms back. Tap side: enum-dot-dev/homebrew-focusrite-volume-control#1.

Changes

  • scripts/render_cask.py emits postflight_steps with run "/usr/bin/xattr" and an install-time {{appdir}} token instead of system_command with Ruby #{appdir}. Same behavior: must succeed, stderr shown, stdout hidden.
  • Template: depends_on macos: :sonoma (same meaning as ">= :sonoma"), desc trimmed to 71 characters for brew style's 80-character limit.
  • Tests check the steps form and that signed builds get no flight stanza.

Verified

  • python3 -m unittest discover -s scripts -p 'test_*.py': 8 tests pass
  • brew style: no offenses on all 8 rendered variants (stable/beta, signed/unsigned, with and without auto_updates)
  • Rendering 1.6.0-beta.2 reproduces the fixed tap cask byte for byte

🤖 Generated with Claude Code

Every brew command that loads the published @beta cask printed two
deprecation warnings, and deprecations later turn into errors:
- Calling `postflight` is deprecated! Use `postflight_steps` instead.
- Calling string comparison format for `depends_on macos:` is
  deprecated! Use `depends_on macos: :sonoma` instead.

render_cask.py now emits `postflight_steps` with `run "/usr/bin/xattr"`
and an install-time {{appdir}} token instead of `system_command` with
Ruby #{appdir} interpolation. Behavior is the same: the command must
succeed, stderr is shown and stdout is hidden.

The template uses depends_on macos: :sonoma, which means the same as
">= :sonoma", and its desc is trimmed to 71 characters (brew style's
limit is 80), so every rendered variant passes brew style.

Tests now check the steps form and that signed builds get no flight
stanza at all.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nickmorozov
nickmorozov merged commit b5924fc into main Nov 25, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant